/*
 * Copyright 2015-2016 Imply Data, Inc.
 * Copyright 2017-2019 Allegro.pl
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import './tech-mixins';

%tiles-item {
  padding: 0 0 0 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.1s ease-in-out;
  width: $item-width;

  &.dimension {
    @include css-variable(background-color, item-dimension);
    @include css-variable(color, item-dimension-text);

    &:hover:not(.disabled), &.selected {
      @include css-variable(background-color, item-dimension-hover);
    }
  }

  &.measure {
    @include css-variable(background-color, item-measure);
    @include css-variable(color, item-measure-text);

    &:hover:not(.disabled), &.selected {
      @include css-variable(background-color, item-measure-hover);
    }
  }

  .reading {
    @include ellipsis;
    pointer-events: none;
    white-space: nowrap;
    margin-right: 20px;
    height: 16px;
    margin-top: 7px;
    overflow-y: hidden;
  }

  .remove {
    @include pin-right(27px);
    @include internet-explorer {
      padding-top: 0;
    }
    text-align: center;
    padding-top: 9px;
    cursor: pointer;

    svg {
      width: 10px;
    }

    path {
      fill: hsla(0, 0, 0, 0.2);
    }

    &:hover path {
      fill: hsla(0, 0, 0, 0.5);
    }
  }

}

%tiles-item-h {
  top: $control-padding-v;
  bottom: $control-padding-v;
}
